<link type="text/css" href="/admins/js/pagerView/pager-view.css" rel="stylesheet" />
<link type="text/css" href="/admins/js/jquery/css/ui-lightness/jquery-ui-1.8.20.custom.css" rel="stylesheet" />
<script type="text/javascript" src="/admins/js/jquery/jquery-ui-1.8.20.custom.min.js"></script>
<script type="text/javascript" src="/admins/js/jquery/jquery.ui.datepicker-zh-CN.js"></script>
<script type="text/javascript" src="/admins/js/pagerView/pager-view.js"></script>
<script type="text/javascript">
    $(function(){
    
        $.datepicker.setDefaults( $.datepicker.regional[ "zh-CN" ] );
        $( "#billboy #userdetail #dateInStore" ).datepicker({
            changeMonth: true,
            changeYear: true
        });
        $( "#billboy #userdetail #dateOut" ).datepicker({
            changeMonth: true,
            changeYear: true
        });
    });
</script>
<style>
    #billboy{
        font-size: 14px;
    }
    #userdetail{
        line-height: 36px;
        padding-left: 20px;
        padding-bottom: 10px;
    }
    #billboy table td{
        border: 1px solid #CCCCCC;
    }
    #packdetail table td{
        border: 1px solid #CCCCCC;
    }
    #bf{
        background-color: #eee;
        text-align: right;
        width: 120px;
    }
    #cf{
        width: 230px;
    }
    
</style>
<?php
if($this->message == 1){
    echo '<script language="javascript" type="text/javascript">alert("修改成功！");location.href = "/admini/managestore/index/"; </script>';
}
?>
<div id='billboy'>
    <form method="post"  >
    <div id='userdetail'>
        包裹信息
        <table width="720" border="1" cellpadding="0" cellspacing="0">
            <tr>
              <td id='bf'>包裹名称：</td>
              <td id='cf' colspan="3">&nbsp;&nbsp;<input type="text" name="productName" id="productName" value="<?php echo $this->ingstoredetail->productName;?>" size="80"/></td>
            </tr>
            <tr>
              <td id='bf'>物流公司：</td>
              <td id='cf'>&nbsp;&nbsp;<input type="text" name="Logistics" id="Logistics" value="<?php echo $this->ingstoredetail->Logistics;?>" /></td>
              <td id='bf'>状态：</td>
              <td id='cf'>&nbsp;&nbsp;<select name="state" id="state">
                      <option value="1" <?php if($this->ingstoredetail->state ==1){echo "selected";}?>>入库</option>
                      <option value="2" <?php if($this->ingstoredetail->state ==2){echo "selected";}?>>出库</option>
                  </select></td>
            </tr>
            <tr>
              <td id='bf'>仓库单号：</td>
              <td id='cf'>&nbsp;&nbsp;<input type="text" name="wayId" id="wayId" value="<?php echo $this->ingstoredetail->wayId;?>" /></td>
              <td id='bf'>类型：</td>
              <td id='cf'>&nbsp;&nbsp;<select id="itemType" name="itemType">
                      <option value="0" <?php if($this->ingstoredetail->itemType ==0){echo "selected";}?>>正常</option>
                      <option value="1" <?php if($this->ingstoredetail->itemType ==1){echo "selected";}?>>仿牌</option>
                      <option value="2" <?php if($this->ingstoredetail->itemType ==2){echo "selected";}?>>电池</option>
                      <option value="4" <?php if($this->ingstoredetail->itemType ==4){echo "selected";}?>>液体</option>
                      <option value="8" <?php if($this->ingstoredetail->itemType ==8){echo "selected";}?>>食品</option>
                      <option value="16" <?php if($this->ingstoredetail->itemType ==16){echo "selected";}?>>粉末</option>
                      <option value="32" <?php if($this->ingstoredetail->itemType ==32){echo "selected";}?>>膏状物</option>
                      <option value="64" <?php if($this->ingstoredetail->itemType ==64){echo "selected";}?>>药物</option>
                      <option value="" <?php if($this->ingstoredetail->itemType ==''){echo "selected";}?>>其他</option>
                  </select></td>
            </tr>
            <tr>
              <td id='bf'>入库时间：</td>
              <td id='cf'>&nbsp;&nbsp;<input type="text" name="dateInStore" id="dateInStore" value="<?php echo date('Y-m-d H:i', strtotime($this->ingstoredetail->dateInStore));?>" /></td>
              <td id='bf'>出库时间：</td>
              <td id='cf'>&nbsp;&nbsp;<input type="text" name="dateOut" id="dateOut" value="<?php if($this->ingstoredetail->dateOut !=''){echo date('Y-m-d H:i', strtotime($this->ingstoredetail->dateOut));}?>" /></td>
            </tr>
            <tr>
              <td id='bf'>重量：</td>
              <td id='cf'>&nbsp;&nbsp;<input type="text" name="weight" id="weight" value="<?php echo $this->ingstoredetail->weight;?>" /></td>
              <td id='bf'>长度：</td>
              <td id='cf'>&nbsp;&nbsp;<input type="text" name="length" id="length" value="<?php echo $this->ingstoredetail->length;?>" /></td>
            </tr>
            <tr>
              <td id='bf'>宽度：</td>
              <td id='cf'>&nbsp;&nbsp;<input type="text" name="width" id="width" value="<?php echo $this->ingstoredetail->width;?>" /></td>
              <td id='bf'>高度：</td>
              <td id='cf'>&nbsp;&nbsp;<input type="text" name="height" id="height" value="<?php echo $this->ingstoredetail->height;?>" /></td>
            </tr>
            <tr>
              <td id='bf'>体积：</td>
              <td id='cf'>&nbsp;&nbsp;<input type="text" name="volumeWeight" id="volumeWeight" value="<?php echo $this->ingstoredetail->volumeWeight;?>" /></td>
              <td id='bf'>条形码：</td>
              <td id='cf'>&nbsp;&nbsp;<input type="text" name="barcode" id="barcode" value="<?php echo $this->ingstoredetail->barcode;?>" /></td>
            </tr>
            <tr>
              <td id='bf'>商品备注：</td>
              <td id='cf'  colspan="3">&nbsp;&nbsp;<textarea name="remark" id="remark" style="margin-top: 15px;width: 510px;height: 100px;"><?php echo $this->ingstoredetail->remark;?></textarea></td>
            </tr>
            <tr>
                <td colspan="4" align="center"><input type="hidden" id="id" name="id" value="<?php echo $this->ingstoredetail->id;?>" />
                    <input type="hidden" id="operate" name="operate" value="editstore" />
                    <input type='submit' name="submit" id="submit" value="确认提交"  onclick="return ckform()"/>&nbsp;&nbsp;&nbsp;
                    &nbsp;&nbsp;&nbsp;<input type='reset' name="reset" id="reset" value="重新填写" />&nbsp;&nbsp;&nbsp;&nbsp;
                    <input type="button" id="refo" naem="refo" value="返回" /></td>
            </tr>
          </table>
    </div>
    </form>
</div>
<?php
if(isset($this->message) && $this->message!=""){
    echo '<script language="javascript" type="text/javascript">alert("'. $this->message .'")</script>';
}

?>
<script language='javascript'>
    function ckform()
    {
        var productName = $('#productName').val();
        var Logistics = $('#Logistics').val();
        var dateInStore = $('#dateInStore').val();
        var weight = $('#weight').val();
        var barcode = $('#barcode').val();
        if(productName == ''){
            alert('包裹名称不能为空！');
            return false;
        }else if(Logistics == ''){
            alert('物流公司不能为空！');
            return false;
        }else if(dateInStore == ''){
            alert('入库时间不能为空！');
            return false;
        }else if(weight == ''){
            alert('物品重量不能为空！');
            return false;
        }else if(barcode == ''){
            alert('条形码不能为空！');
            return false;
        }else{
            return true;
        }
    }
    $("#refo").click(function(){
       location.href = "/admini/managestore/index/"; 
    });
</script>